[DllImport("kernel32.dll")]
static extern bool SetLocalTime([In] ref SYSTEMTIME lpLocalTime);
<DllImport("kernel32.dll")> _
Shared Function SetLocalTime(ByRef time As SYSTEMTIME) As Boolean
End Function
None.
Please add some!
Please add some!
Imports System.Runtime.InteropServices
Public Class Class1
<StructLayout(LayoutKind.Sequential)> _
Private Structure SYSTEMTIME
<MarshalAs(UnmanagedType.U2)> Public Year As Short
<MarshalAs(UnmanagedType.U2)> Public Month As Short
<MarshalAs(UnmanagedType.U2)> Public DayOfWeek As Short
<MarshalAs(UnmanagedType.U2)> Public Day As Short
<MarshalAs(UnmanagedType.U2)> Public Hour As Short
<MarshalAs(UnmanagedType.U2)> Public Minute As Short
<MarshalAs(UnmanagedType.U2)> Public Second As Short
<MarshalAs(UnmanagedType.U2)> Public Milliseconds As Short
End Structure
<DllImport("kernel32.dll")> _
Private Shared Sub GetLocalTime(ByRef time As SYSTEMTIME)
End Sub
<DllImport("kernel32.dll")> _
Private Shared Function SetLocalTime(ByRef time As SYSTEMTIME) As Boolean
End Function
Public Sub SetsLocalTimeHourToEight()
Dim currentTime As SYSTEMTIME
GetLocalTime(currentTime)
currentTime.Hour = 8
SetLocalTime(currentTime)
End Sub
End Class
Do you know one? Please contribute it!